import React, { Suspense } from 'react';
import { useRoutes } from 'react-router-dom'
import './global.css'

import routes from './routes'
import PageLoading from './component/pageLoading'

function App() {
  const element = useRoutes(routes);

  return (
    <Suspense fallback={<PageLoading />}>
      {element}
    </Suspense>
  );
}

export default App;
